Manual/Demos
In OpenArena, a demo is a "recording" of a match, stored in file that can be later played by the game. This means that you can record your matches (from your own point of view when you are playing, or from someone else's point of view when you are spectating) and watch them later, inside OpenArena. If you wish, you can send the demo file to friends of yours that use the game. Demo playback elaborates 3D graphics in real-time (the machine does not work like when watching a movie, but like when playing the game): this allows demo files to maintain reasonable size, but they can be played only using OpenArena, and demos recorded with too much different versions of the game may have compatibility problems. However, they exist methods to create "movies" starting from demos, thus allowing video editing and video playing outside the game (third party software needed to play and modify AVI or similar video files). A demo file has got an extension like .dmXX, where XX is a number that changes when major updates to the game change the protocol version, for example a demo recorded with OpenArena 0.8.5 (which uses protocol 71) will have a .dm71 extension. Recording All the demo files you record one way or another will be saved to a "current-mod/demos" subfodlder under your "homepath folder", for example "~/.openarena/baseoa/demos/" (under Linux) or "~/Application Data/Open Arena/baseoa/demos/" (under Windows XP). If you are in one of the mods, for example CPMA, the demo directory is "cpma/demos/" instead of "baseoa/demos/". The demo files in the demos directory will show up in the demo list when you choose the "Demos" menu item. Classic way of recording a demo To record your own demo, you can pull down the command console and type /record command. To end the recording, pull down the console again and type /stoprecord. This creates files with dumb names, like "demo0001.dm_71", automatically incremented (anyway you will be able to change them later using your operating system). If you wish, you can use /record (file extension is automatically added) to specify a name to use (e.g. /record mytest will create a mytest.dm_71 file); if manually specifying an already existing demo name, that file will be overwritten without warning. During recording, you will see file name and size in the upper edge of the screen. Instead of using the console each time, you can bind two keys which you can use to start/stop the recording, for example: /bind o "record" /bind p "stoprecord" This method is good for short demos. Smarter way of recording a demo Use the following bindings instead if you want a new file to be started each time a game starts, so each game will be in its own file (obviously, you may also manually enter the commands by using the console instead of binding them to specific keys): /bind o "cl_autoRecordDemo 1" /bind p "cl_autoRecordDemo 0;stoprecord" This creates files with rich names, which contain the date, time, ip of the server you are connected to, and map name, which is useful. Entering /stoprecord command while cl_autoRecordDemo is still enabled will end the current demo file and will continue the recording on a new file. Automatically recording all your games If you want all your games to be recorded, each in its own file, use this command, which will make a persistent setting: /seta cl_autoRecordDemo 1 To disable it, use /seta cl_autoRecordDemo 0 (and then use /stoprecord to stop the current recording). Recording a best-quality demo When you start recording, you will probably get a warning in the console, "WARNING: You should set 'g_synchronousClients 1' for smoother demo". If you leave it to 0, the demo might look crappy when viewed later. To record a best-quality demo, g_synchronousClients has to be set to 1, and has to remain 1 until you stop recording! Attention, using tricks like 'g_synchronousClients 1;record;g_synchronousClients 0' has no effect, it's the same as using 'record'! This is because g_synchronousClients change the way the game engine works, and if you start recording and then set g_synchronousClients to 0, it will act accordingly. Anyway, this trick is sometimes used to avoid warning and cases where the engine refuses to start a record if you are not synchronized, in these cases this trick can be useful (see below on how to record an AVI). Why don't we leave it to 1 all the time, then? Well, the problem when g_synchronousClients is set to 1 is that when you play, the gameplay will feel laggy. This is because when g_synchronousClients is enabled, the client (you) will send its actions to the server (as usual), but then it will wait for all the other clients to also send their actions, and then the response of the server updating the world state. This way, you are completely synchronized not only with the server but with all other clients, but at the cost of being very laggy. So if you want to record a best-quality demo of a game you play, you should have a spectator (it can be even you on a second computer) spectating you, and that spectator will have to set g_synchronousClients to 1 and record the demo. Use this binding to toggle g_synchronousClients: /bind i "toggle g_synchronousClients" This way, you will enable or disable g_synchronousClients each time you will press the "i" key. Trivia: variables that begin with "g_", usually are serverside. Despite its name, g_sychronousclients is a clientside variable instead. Playing a demo You'll discover the demo browser in v0.8 completely sucks, especially if you have a lot of demos and they have long file names. You can use this command to play a demo: /demo Use TAB completion when writing the filename. This will work on the demos in the "baseoa/demos/" directory. On Linux, you can use this script to easily play a demo: http://openarena.ws/board/index.php?topic=2327.msg18231 When playing a demo, the only thing you can do is to bring down the console. Any other key you press will take you out of the demo. It is possible to set \cl_freezedemo 1 (deault value is 0) to "stop" the screen at the current frame (and sound stops, too), but the demo will continue to run on background: when you will set cl_freezedemo to 0 again, you will notice the demo will jump ahead. TODO: Mention commands which can be useful when playing a demo: timescale, changing point of view. Advanced Timedemo: use demo as benchmark It is possible to use the game as an hardware benchmark tool. To do it, set /timedemo 1 (default value is 0), then play a demo (as usual, with the /demo command): that demo will be played at the maximum possible speed (e.g. a demo that usually plays in one minute could be played in three seconds); after playback end, pull down the console to read the average fps count (frames-per-second, higher is better); at the end, set timedemo to 0 again. You can repeat the same test with different graphic settings, and/or copy the same demo file to more machines (where you should set similar graphic settings), write down somewhere the results and compare them to figure out which hardware works better with the game. Benchmarking with different settings on the same machine may help you to find the best ratio of quality settings/speed for you; anyway, remember that when not running a timedemo, your maximum frames-per-second limit is limited by your com_maxfps setting (a variable that you should keep on a fps value your machine can manage constantly), see Graphic options#Framerate. Comparing different systems could be not too easy, cause of the huge number of options that could be differently set on players configurations. A way to do it could be to start both machines with a "clean" OpenArena configuration (this way, both of them will have the same default settings active), and then run the same demo file with the same settings. Then you could do the same configuration changes on both computers and repeat the test. Once finished, restore your original custom configuration. Note: OpenAL sound system is enabled by default, but is only effective if the system has this component installed, otherwise SDL sound system is used; normally it should not have a big effect on performances, but you may want to try both with it enabled or disabled. If you need a step by step guide for comparision of two machines (repeat the same on both; pay attention to do not delete your working configuration by error): * Locate your "baseoa" folder in your "homepath folder" (if using Windows, it's %appdata%\OpenArena\baseoa; see Homepath for more info), which contains your "q3config.cfg" file. * Rename "q3config.cfg" to "q3config.cfg.sav", or to "q3configGOOD.cfg" or whatever you wish. * If you have an "autoexec.cfg" file, you can rename it to "autoxec.cfg.sav" or "autoexecGOOD.cfg" or whatever you wish. * Launch OpenArena. It is now using default configuration. * Set /timedemo 1. * Play the demo you wish, and at the end check the resulting FPS in console. * If you wish, change some settings in configuration (e.g. use an higher resolution, better texture quality, etc. -see Manual/Graphic options-) and repeat the test. * When you finish, close OpenArena. * Now delete the current "q3config.cfg" file (or rename it to "q3config.cfg.test" or similar, if you prefer), and then rename "q3config.cfg.sav" (or "q3configGOOD.cfg" or whatever you called it) and -''if'' you had it- "autoexec.cfg.sav" (or "autoexecGOOD.cfg" or whatever you called it) to their original names (q3config.cfg and autoexec.cfg). This way, you will restore your own configuration. Export to a video file How to create a movie AVI file starting from a demo Creating an AVI file from a demo is very easy and straightforward with ioquake3 as it offers several facilities to do it, directly from the game. The process is very straitghtforward: 1- Record a demo: see recording instructions above); 2- Watch the demo and save to a movie file: /demo "" // Replay the recorded demo named "" /video "" // While a demo is replaying, save what is watched to a movie file named "" To tweak the movie settings: /cl_aviMotionJpeg <0 or 1> // this cvar controls which format the AVI file is created in - set it to 0 for uncompressed video (uses insane amounts of hard drive space) or set it to 1 for Motion Jpeg which is more space efficient, but lower quality. Default value is 1. /cl_aviFrameRate // This is the frame rate that the AVI is created at, higher values make the video appear smoother when playing back but need more CPU power. Default value is 25 (like PAL TV), and should be fine for most people (Hollywood movies are recorded at 24 FPS, and NTSC TV is about 30 FPS). This is all you need to know to make your first OA movie, but you can make your life easier and your videos quality better with some scripts and settings. Scripts and settings for movie - Ease your recording When recording a demo, you may find that sometimes the console prompts you to be synchronized. This is logical because you need to be synchronized to other players to be able to faithfully record the actions (even if it's not a server-side demo). This is simply fixed by setting: /g_synchronousClients 1 // Synchronize your client to the other clients (wait for the server feedback before updating your local world state) The problem with g_synchronousClients is that it will make you lag a lot, because you will have to wait for the server's confirmation of every player's move before your world gets updated. If you are spectating, then that's no problem, but if you are playing while you're recording your demo, this can be pretty frustrating. An easy way to workaround that is to use a script that will automatically toggle this cvar just before recording, so that the game accepts to record, and then toggle it off. Theoretically, with g_synchronousClients 0 your recording can have some quirks (because you are recording unsynchronized with the server), but concretely, you will see no difference in the resulting demo (furthermore with delag, clients get almost always a full integrity of the data). Copy/paste the following code into your q3config.cfg: bind F12 "vstr recorddemo" set recorddemo "vstr recorddemostart" set recorddemostart "set g_synchronousClients 1;set cl_autoRecordDemo 1;set g_synchronousClients 0;set recorddemo vstr recorddemostop;echo ^2Demorecording ^2Started!;echo ^2Do ^2Not ^2Forget ^2To ^2Stop ^2Demo ^2Before ^2Exiting ^2Game!" set recorddemostop "set cl_autoRecordDemo 0;stoprecord;set g_synchronousClients 0;set recorddemo vstr recorddemostart;echo ^2Demorecording ^2Ended!" This will bind to the key F12 the record action. Just press F12 to start recording, and press again F12 to stop recording. Of course, you can bind to any other key that you prefer. - How to record a movie from the beginning of a demo? Very easy, simply type the following command in the console: /demo "" ; video "" This will replay the demo and immediately, after the map loads, will start recording a movie. - How to save the movie in a different drive than the OA user folder? You may find it very annoying that you can't specify the fullpath where to save your movie (example: you may want to use a drive where you have more free space available). To circumvent that, you can specify a homepath where the game should store all of its data. This is very easily done: when launching the game at commandline, add the following argument: +set fs_homepath "" So you will get something like this: ./openarena.i386 +set fs_homepath "L:/openarena/" - How to enhance the graphical quality of my movie? The graphical quality of your movie will be directly dependent of your graphical game settings. This means that before saving your movie, you should set all your graphical settings to Very High, and activate the optional graphical parameters such as Anisotropy and Boom Effect (if you like it). An example of settings: seta s_useOpenAL 0 seta cg_drawSpeed 0 seta cg_drawFPS 0 seta r_bloom 1 seta r_picmip 0 seta r_flares 1 The resolution (r_mode) is also an important parameter: higher the resolution, finer will be the recording (but bigger will be the filesize, so be prepared!). Also, an important thing to note is that higher the resolution, smaller will be the chat lines, so if it's important to you to record the chatlines (if for example you're recording a tutorial video, you may find it useful to use a small resolution). Also, you can get a pretty decent fine video by having a small resolution but a high anisotropy. seta r_mode "0" // resolution of the screen : -1=custom (see r_custom*) ; 0=340x280 ; 1=420x340 ; 2=530x420 ; 3=640x480 ; 4=800x600 ; 5=1024x768 ; etc... For widescreen, you can also play with the r_mode parameter. seta r_mode "-1" seta r_customaspect "1" // enables custom aspect of the screen, with r_mode -1 seta r_customheight "768" // custom screen height with r_mode -1 (useful for widescreens) seta r_customwidth "1366" // custom screen width with r_mode -1 (useful for widescreens) Also, remember that higher the resolution, slower your video framerate will be, unless you have a very powerful CPU. Generally, it is preferable to have a lower resolution and higher, smoother framerate (which defines the smooth of the movements), rather than a high resolution with jittering movements. Lastly, you can play with the video specific parameters: seta cl_aviMotionJpeg 1 // this cvar controls which format the AVI file is created in - set it to 0 for uncompressed video (uses insane amounts of hard drive space) or set it to 1 for Motion Jpeg which is more space efficient, but lower quality. Default value is 1. seta cl_aviFrameRate 25 // This is the frame rate that the AVI is created at. Default value is 25. If you set cl_aviMotionJpeg, you will get a raw video. If you can allow it (you have a lot of space, roughly 1 GB per minute of video), then this is the preferable option. You can later recompress the video by yourself with high quality encoders such as H264. But if you can't, compressing into MPG is still a good compromise and give a good quality. About the frame rate that the AVI is created at, higher values make the video appear smoother when playing back but need more CPU power. Default value is 25 (like PAL TV), and should be fine for most people (Hollywood movies are recorded at 24 FPS, and NTSC TV is about 30 FPS). You may want to use an higher framerate if you are planning to later use non-linear video editing software to create a movie including high quality slow-motion sections. - How to remove the HUD You can simply bind cg_draw2D to a key: /bind F10 toggle cg_draw2D This will allow you to quickly remove the HUD while recording a part of a demo, and quickly toggle it back when you're finished. After saving the video Now that you have your movie file, you can reencode it to another format to compress it, or add some editing like motion blur with video editing softwares such as VirtualDub or Adobe After Effect. You can also use third-party tools to watch your demos with added graphical effects such as OAmme (eg: motion blur, slow motion, etc.). You can also find a good tutorial about video recording here: http://rainbow.furver.se/index.php?name=Forums&file=viewtopic&t=1152 Export to a sequence of image files TODO: How to export a demo to a series of screenshots. the same as video saving but only a cvar to change Server-side demos A server-side demo is a demo where all players' actions were recorded, as opposed to a standard demo where only the player recording the demo is recorded (or the player spectated by the player recording). Concretely, when you watch a server-side demo, this is just like you are a spectator of a live game: you can usually freely fly around as spectator or follow specific clients from their viewpoint, just like the game would take place right now (though you can not join). How it works Normal client-side demo files (with .dm_XX extension) are just a dump of incoming network data on a client. Therefore they only include what this client saw (either from his perspective or the player he spectated). The server on the other hand has full information about all players in the game. Types of server-side demos There are two types of server-side demos: 1- Fully server-side demo: the demo is recorded by the server with the data the server has. With this type of demo, all players' actions and positions are recorded and are very precisely reflecting what was processed by the server. This may be slightly different from what the players saw - particularly with delag and timenudge, because the server-side demos don't account for them. Some mods (e.g. ExcessivePlus) have facilities to also replay the players' delay when watching the demo to get a very high fidelity reproduction of the game from the players' viewpoints. To get such a demo, you will have to ask the serveradmin to send it to you. 2- Multiview demo, alias all clients-side demos: the server does not record the demo, but redirects every flux it gets from every player to a single player, which is recording all the flux. With this type of demo, the resulting demo is not really a server-side demo since it was not recorded by the server but redirected to a player who is recording the demo. The result is about the same: you get all players' actions, but this may result in a lesser fidelity since the client recording also have some delay that he may not be able to take fully in account while recording the demo. The name Multiview demo is derived from a feature called Multiview that you can find in some mods such as ExcessivePlus and CPMA which allows spectators to watch multiple players at once on a single screen divided into a grid of 3x3, 4x4 or 5x5 cases. Examples of mods producing multiview demos include CPMA and ExcessivePlus. There is a third kind of server-side demos where the server just dumps the data it sends to clients (instead of the client dumping the data it recieves). Those demos only differ in their framerate but consist of the same data. They can be played back in OA without a mod, but you need to obtain them from the server admin. this the same as the first kind - fully server-side demo? How to use/watch a server-side demo To watch a server-side demo, it depends on how you recorded the demo: - If it was recorded with the server-side demo patch for OA, you can watch the demo with the standard OA. it really need a patched engine and gamecode to watch? - If it was recorded using a mod such as ExcessivePlus which encodes demos in the standard format but adds extra informations, you can either watch the demo with ExcessivePlus and get the full information, or watch it in OA without a mod, but then you won't get all the information and demo playback can be a bit buggy sometimes. - If it was recorded using a mod such as CPMA which uses its own encoding format of demos, you can only watch the demo using the same mod you've used to record the demo. Additional tools There are some tools that allow to do advanced tasks. * Quake 3 Moviemaker's Edition (a.k.a. Q3MME). This tool allows special camera options and more features. It is useful to create videos. You can find it here. It is for Quake III Arena, but here you can find some instructions about how to make it work with OpenArena; and here there is an alternative method. * OpenArena Movie Maker's Edition (a.k.a. OAmme or OAMME) is derived from Q3MME, adapted to fit OpenArena. You can find the the site of the author here (the page about OAmme is here) and the thread about it on OA forum here. You can find an how-to video tutorial here. Version 4 is available here (1.5 MB). * GamersTV (a.k.a. GTV) allows to "retransmit" online matches, to allow more people to spectate them. It is for Quake III Arena (you can find it here), but it has been created an "hacked" version that works with OpenArena: you can find it here. Category:Manual Category:Tools